from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC  # 起个别名
from time import sleep
from options import options
from service import service

dr=webdriver.Chrome(options=options,service=service)
dr.get(r'https://www.baidu.com/')
dr.maximize_window()
sleep(1)

cookie1 = {'name': 'test01', 'value': '123'}
dr.add_cookie(cookie1)
for cookie in dr.get_cookies(): # 获取 cookie
    print(f'{cookie["name"]}----------{cookie["value"]}')
    sleep(1)
dr.quit()